<template>
  <div class="base-container">
    <t-form ref="form" :data="queryParams" label-width="64"
            @submit="()=>{this.pagination.current=1;this.queryParams.pageNum=1;}"
            @reset="()=>{this.pagination.current=1;this.queryParams.pageNum=1;}">

      <t-row style="border-bottom: 1px solid #E5E6EB;margin-bottom: 10px">
        <t-col :span="11" class="query-form-inline">
          <t-form-item label="系统名称" name="systemName">
            <t-input
              v-model="queryParams.systemName"
              clearable
              placeholder="请输入系统名称"
              style="width: 240px"
            />
          </t-form-item>
          <t-form-item label="应用联系人" name="systemLinker">
            <t-input
              v-model="queryParams.systemLinker"
              clearable
              placeholder="请输入应用联系人"
              style="width: 240px"
            />
          </t-form-item>
          <t-form-item label="建设责任人" name="dutyPerson">
            <t-input
              v-model="queryParams.dutyPerson"
              clearable
              placeholder="请输入建设责任人"
              style="width: 240px"
            />
          </t-form-item>
          <t-form-item label="建设联络员" name="dutyPerson">
            <t-input
              v-model="queryParams.dutyPerson"
              clearable
              placeholder="请输入建设联络员"
              style="width: 240px"
            />
          </t-form-item>
          <t-form-item label="建设年月" name="liaisonDate">
            <t-date-picker presetsPlacement="left" />
          </t-form-item>
          <t-form-item label="完成年月" name="completeDate">
            <t-date-picker presetsPlacement="left" />
          </t-form-item>
        </t-col>
        <t-col :span="1" class="operation-container">
          <t-button theme="primary" type="submit"> 查询</t-button>
          <t-button theme="default" variant="outline" type="reset">重置</t-button>
        </t-col>
      </t-row>
    </t-form>
    <div class="btn-group-inline">
      <t-button @click="apply" variant="outline" theme="primary">
        <t-icon name="add" slot="icon"/>
        填写评价
      </t-button>
    </div>
  </div>
</template>

<script>

export default {
  data(){
    return {
      queryParams: {
        systemName: '',
        systemLinker:'',
        dutyPerson:'',
        liaisonDate:'',
        completeDate:'',
      },
      pagination: {
        current: 1,
        pageSize: 10,
        total: 0,
        showPageSize: true,
        pageSizeOptions: [10, 20, 30],
        showFirstAndLastPageBtn: false,
        onChange: (pageInfo) => {
          Object.assign(this.pagination, pageInfo)
          this.queryParams.pageNum = pageInfo.current || 1;
          this.queryParams.pageSize = pageInfo.pageSize;
          this.getList()
        },
      },
    }
  },
  methods:{
    apply() {
      this.$router.push(`/yxjk/other/review/evaluation-apply/${Date.parse(new Date())}`);
    },
  }
}
</script>
